//
//  NetWorkTool.m
//  PersistentPlan
//
//  Created by zhoufei on 16/4/15.
//  Copyright © 2016年 zhoufei. All rights reserved.
//

#import "NetWorkTool.h"
#import "AFNetworkReachabilityManager.h"

@implementation NetWorkTool
+ (instancetype)sharedInstance
{
    static dispatch_once_t onceToken;
    static NetWorkTool *newWorkTool;
    dispatch_once(&onceToken, ^{
        newWorkTool=[[[self class] alloc]init];
    });
    
    return newWorkTool;
}

/**
 *  开启网络监控
 */
- (void)netWorkStartMonitoring
{
    [[AFNetworkReachabilityManager sharedManager] startMonitoring];
    
    [[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
        //有网时
        if (status>0) {
            
        }else{
        
        }
    }];
}


@end
